import React from 'react';
import { totalConfig, propName } from 'config/templateConfig'

let latticeConfig = totalConfig.lattice;

export default React.createClass({
    componentDidMount() {

    },
    open() {
        let opts = this.props.opts, self = this;
        let latticeId = opts.latticeId;
        let latticeInfo = latticeConfig[latticeId];
        let items = latticeInfo.items;
        window.player.bag.addItem([items[0], 1]);
    },
    render() {
        return <div>
            <div className="flex jc-center"><button onClick={this.open}>打开</button></div>
        </div>
    }
})